Hi,
I have a programming design question. I would like to do this in Python,
but I am not even sure about what tools are proper or where to start
reading.
I am trying to make a small network system where several client computers
connect to a server. each client can send messages to the server which must
alert all of the clients of the information in the messages. Further, the
server must be able to alert all connected clients about other occasional
information. The total number of messages is low, however. for now, security
is not an issue if that matters.
I know a way to do this in win32 using dcom, but this seems sloppy, and i
need it to run on freebsd and win32 at a minimum, and pocketPC if at all
possible. I also thought about using ZEO coupled with a Queue class, but I
am not sure about clients reacting to events in this case, or about ZODB/ZEO
on pocketPC.
(The specifics of the project are to make a wifi enabled jukebox out of an
old freebsd computer hooked to my stereo which can be controlled by all of
the other computers in the house. I did a previous version of this using
SimpleHTTPServer, but this seems a dead end for forcing the playlist queue
and such onto clients.)
Any suggestions on how to start would be appreciated.
Thanks,
doug 4 3719
On Thu, Jun 26, 2003 at 06:02:17AM +0000, drs wrote: Hi,
I have a programming design question. I would like to do this in Python, but I am not even sure about what tools are proper or where to start reading.
An excellent tool for socket programming is Twisted: http://twistedmatrix.com/
I am trying to make a small network system where several client computers connect to a server. each client can send messages to the server which must alert all of the clients of the information in the messages. Further, the server must be able to alert all connected clients about other occasional information. The total number of messages is low, however. for now, security is not an issue if that matters.
You might like PB, Twisted's remote object protocol, which can do all this.
It might be overkill though; I recommend you take a look at the docs and
decide for yourself. Twisted also has support for lots of standard
protocols, including stuff like XML-RPC.
If you want to use a custom protocol, that's also pretty easy in Twisted.
I know a way to do this in win32 using dcom, but this seems sloppy, and i need it to run on freebsd and win32 at a minimum, and pocketPC if at all possible. I also thought about using ZEO coupled with a Queue class, but I am not sure about clients reacting to events in this case, or about ZODB/ZEO on pocketPC.
Twisted runs on FreeBSD and Win32, and I seem to recall someone got it
working on a PocketPC or something like it without too much effort.
(The specifics of the project are to make a wifi enabled jukebox out of an old freebsd computer hooked to my stereo which can be controlled by all of the other computers in the house. I did a previous version of this using SimpleHTTPServer, but this seems a dead end for forcing the playlist queue and such onto clients.)
That sounds like an excellent use for Twisted. I don't think it's actively
developed, but there's a project called "mc-foo" that is a Jukebox using
Twisted. You may want to start there, rather from scratch.
-Andrew.
Hi,
drs wrote: I am trying to make a small network system where several client computers connect to a server. each client can send messages to the server which must alert all of the clients of the information in the messages. Further, the server must be able to alert all connected clients about other occasional information. The total number of messages is low, however. for now, security is not an issue if that matters.
You may find the YAMI project: http://www.maciejsobczak.com/prog/yami/
to be very useful for your needs.
i need it to run on freebsd and win32 at a minimum, and pocketPC if at all possible.
YAMI works fine on FreeBSD, Linux, MS Windows and SunOS. I did not try
it on PocketPC, but chances are it will go, if you know how to write
Makefiles for this platform. ;)
--
Maciej Sobczak http://www.maciejsobczak.com/
Distributed programming lib for C, C++, Python & Tcl: http://www.maciejsobczak.com/prog/yami/
"Irmen de Jong" <irmen@-NOSPAM-REMOVETHIS-xs4all.nl> wrote in message
news:3e***********************@news.xs4all.nl... If you don't care about the communication internals, (and it seems very likely that you don't), try Pyro : http://pyro.sourceforge.net
Pyro makes it VERY easy to build distributed object systems in Python. (a basic client and server take no more than 5 to 10 lines of code, of which only two or three are Pyro-specific).
If you know DCOM, you know the basics of distributed object systems, and you should feel at home very soon when using Pyro. Not forgetting that it is tremendously easier to use than DCOM.. ;-)
This looks really interesting. In COM, there is the concept of a single use
server where every client shares the same instance. Python does not really
support creating a single use DCOM server, at least not last time I looked
into it. Is this something Pyro can easily do, or will I need to use a db of
some sort to keep track of shared data?
-doug
drs wrote: This looks really interesting. In COM, there is the concept of a single use server where every client shares the same instance. Python does not really support creating a single use DCOM server, at least not last time I looked into it. Is this something Pyro can easily do, or will I need to use a db of some sort to keep track of shared data?
It actually is the default in Pyro :-)
You're creating Pyro server object instances. Every object instance can
be referred to by a unique logical name. If your Pyro client connects to the
logical name, it will remotely access the same object instance that all
other clients that requested that object by that name also do.
So, the object's state is always shared in Pyro. This means that your
object's implementation must be able to deal with concurrent /
multithreaded invocations (although Pyro can help you a bit with this).
--Irmen de Jong This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jean-Philippe Guyon |
last post by:
Hello,
I am trying to compile a class that uses socket using the Visual C++
..NET compiler. I get the following error:
------ Build started: Project: infCommon, Configuration: Release Win32...
|
by: cocla |
last post by:
I try to connect to server using following codes:
(smart device application)
Socket s=new Socket();
try
{
s.connect(host);//host is an object of IPEndPoint class
}
catch (SocketException)
{
|
by: Chad Z. Hower aka Kudzu |
last post by:
A few of you may recognize me from the recent posts I have made about Indy
<http://www.indyproject.org/indy.html>
Those of you coming to .net from the Delphi world know truly how unique and...
|
by: Andrew Arace |
last post by:
Hi,
I'm wondering what the industry practices are for socket and internet
programming. Can you provide any links to good articles on network
application architecture? I have found many tutorials,...
|
by: kuba bogaczewicz |
last post by:
Hello all,
for my school project I have to write a small peer-2-peer application
using Sockets, and I've chosen C# for the task.
I've been doing some research on the topic, and I would really...
|
by: Uma - Chellasoft |
last post by:
Hai,
I am new to VB.Net programming, directly doing socket programming. In C, I
will be able to map the message arrived in a socket directly to a structure.
Is this possible in VB.Net. Can...
|
by: Hao |
last post by:
We are doing very intensive network communication. We collect data from
thousands of electric devices every minutes. The devices understand both
socket and web service. They are either embeded...
|
by: =?Utf-8?B?TWlrZVo=?= |
last post by:
I have a sync socket application. The client is blocked with
Socket.Receive(...) in a thread, another thread calls Socket.Close(). This
unblock the blocked thread. But the socket server is still...
|
by: emlinux |
last post by:
hi to all i want to know little conformation about the socket programming the question is a server socket in tcp in listen mode can receive a udp packet on the listening socket is this possible ....
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
| |