MemCached client with Delphi - delphi

Hallo, Does anyone perhaps know how to interface with a MemCached server (linux) from within a Delphi win32 application?
I am unable to find a general C DLL client, or perhaps delphi code to communicate to the server.
Any suggestions/help would be appreciated.
Thanks
Eric Grobler

A Delphi client for Memcached can be found on google code:
http://code.google.com/p/delphimemcache/

Since the protocol is fairly simple, just about any library which handles telnet should be able to handle communication with the server. This includes Indy, Synapse, and ICS. I based this off of the protocol documentation.
My preference would be to implement using Synapse. Synapse uses an object model rather than a component model, and is very easy to use and extend. The latest developers version (available via SVN) supports Delphi 2009 and I would expect soon to support Delphi 2010.

Thanks for your feedback, I will try a telnet communication.
(and have a look at Synapse)
Regards
Eric

Related

Looking for solid SMTP component for Delphi 2006,

Indy is not enough for me, it must support SSL and be rock solid, can be commercial also
Indy 10's SMTP component supports SSL. What problems are you having with it?
Icsn (and Ics-ssl) components at :
http://www.overbyte.be/frame_index.html
I've used IP*Works SMTP component before. I didn't do anything involved with them, I used them to send an email with error information basically. I have never used the SSL version either.
I don't believe you can purchase the components individually either.
http://nsoftware.com/ipworks/components.aspx
I use Synapse library. It works very well with SSL/TLS. There is public wiki with information on "How To Use SMTP with TLS". It works with Delphi (I use Turbo that is based on 2006) and FPC. It is "normal" library, not component and in my opinion this is advantage for command line utilities or server applications.
SMTP is so trivial protocol (unless you use SASL or other exotic authentication methods) that any component would work. Of course, I would recommend our SecureBlackbox product. Freeware libraries such as Indy, ICS, Synapse to get SSL have bindings to OpenSSL DLL and also to SecureBlackbox (none of the listed has own SSL implementation).

Programs built on Datasnap

I have done a search on Google for applications writen with Datasnap and didn't find much information.
What well know applications are written in Datasnap 2009 / 2010 ?
Is using Datasnap 2010 a viable choice compared to using other frameworks like RemObjects, Midware or kbmMW.
Cheers
AJ
I think the applications written with datasnap will be mainly custom build applications and therefore not listed on any public website. At least all projects I have worked on that used datasnap were custom build applications.

Does Indy support raw TCP sockets on Windows?

I'm a C++ programmer, but my question is about the Delphi network socket library Indy.
Essentially as Microsoft crippled raw sockets with WinXP SP2 so that TCP data cannot be sent over them, does this then also apply to Indy? One of my friends recommended it to me rather then using the WinSock API.
If not, then is the only way to use raw TCP sockets using the WinPCap API?
If it doesn't, I know that synapse for Delphi does. The latest version now supports D2009 and it is being actively supported.
As you can see from the other answers there are a lot of Delphi libraries to simplify network programming. However, AFAIK they all provide a friendlier layer over the WinSock API (on Windows, over the standard socket API on other OSs) and thus are not able to do anything that the WinSock API isn't able to do. In particular they may or may not support raw socket access, but if the OS fails to send data over the socket the libraries will only return errors as well.
For more information about the limitations of raw sockets on most recent Windows OS versions see this MSDN page, in particular the section "Limitations on Raw Sockets". It states quite clearly that
To get around these issues, it may be required to write a Windows network protocol driver (device driver) for the specific network protocol.
Neither of the Delphi network programming libraries comes with its own network protocol driver AFAIK. And neither will help you with permission issues on limited user accounts, or the interference of the Windows Firewall.
As you mention WinPcap in your question you know it is capable of doing what you want. There are Delphi wrappers for it, like Magenta Systems Internet Packet Monitoring Components. However, as a C++ programmer you may be better off to use the library directly from C++, as Delphi adds nothing in regard to the socket programming you want to do. In particular you won't need the extra layer to hide platform differences that some of the Delphi libraries provide, as you will be programming directly against the libpcap API.
Indy works quite well. I use it quite a bit with few problems.
If your looking for more basic socket interaction you could use these other components:
TTCPClient
TCPServer
TClientSocket
TServerSocket
All of these components also ship with Delphi.
Don't know about winpcap directly, but I believe there is a delphi wrapper for it. I don't currently know where I've seen it but it shouldn't be hard to find using Google code search.
you should check ICS components
ICS is a free internet component
library for all Delphi, C++Builder,
BDS and RAD Studio versions (win32).
It includes TCP, UDP, raw sockets,
clients, servers, as well as many high
level protocols such as FTP, SMTP,
POP3, NNTP, HTTP and more.
http://www.overbyte.be/
I would rather prefer synapse over than Indy, it's architecture is more simpler thus easier to understand.

Can Delphi 2009 build web service that returns a DataSet?

In the sample Delphi web service tutorials I've read, they tend to build a web service that returns a simple string or integer, e.g.
http://blogs.codegear.com/pawelglowacki/2008/12/18/38624
However, I read it's possible in .NET to build a web service that returns a DataSet or even an object. Is this possible in Delphi 2009, and if so where can I find more info on this?
Also, what's your opinion on tools for building a web service, between Delphi and .NET?
Delphi 2009 has full suport for returning classes and datasets from webservices.
Datasnap is the framework that supports datasets you can find more information in this video by Nick Hodges, Delphi Product manager, this whitepaper by Marco Cantù (whitepaper extracted from his book “Delphi 2009 Handbook” and this code by Bruno Lichot.
Yes, it is possible to do so; you can do it by using Delphi's DataSnap with SoapConnection.
DataSnap is Delphi's multi-tier solution. In Delphi 2009 it saw a major update, and named DataSnap 2009, but DataSnap 2009 doesn't yet support some features of old DataSnap, like using WebServices for communication. The good news is that the older DataSnap is still available in Delphi 2009, and you are not forced to use DataSnap 2009.
OK, please let me know if the following is correct:
DataSnap 2009 can transmit datasets, but does not support communication via web service. i.e. both the client and server must be written in Delphi 2009?
Plain old DataSnap can transmit datasets using web service, but requires COM?
So next question would be, what would be use to consume a dataset returned by a web service?
As far as I know, .Net and Java clients can access DataSnap 2009 server too.
Old DataSnap doesn't use COM for SoapConnection, but COM is used for other kinds of connections (e.g. socket connection).
So next question would be, what would
be use to consume a dataset returned
by a web service?
On the server side, you can put DatasetProviders which connect to the dataset controls, and provide datasets for clients.
On the client side, ClientDataset is used to receive data provided by DatasetProviders on the server.

How is the best way to write a SOAP 1.2 Client with Delphi Win32

So far, no Delphi version supports SOAP 1.2 clients or server.
I have tried for weeks to make it works, but every time a new problem, with VS/C# I could do the same, and make works in 3 days, but I need to do with Delphi 2009.
"I write a new version using Rem Objects SDK,", but the result was not better that I had with Delphi SOAP library.
But I'm wondering what choice else do I have, which library/component full support SOAP 1.2?
I found a message from Bruneau, suggesting Pocket SOAP
http://www.pocketsoap.com/pocketsoap/
I don't know how this works, Ill investigate and see what I can do.
Remember to vote for SOAP 1.2 support on codegear's QC:
http://qc.codegear.com/wc/qcmain.aspx?d=66864
Currently, it's voted the #2 report for Delphi (after 64bit support). I'm really sure that CodeGear is not going to ignore this.
Follow up. This has been implemented in Delphi 2010.
I suggest that you dig into the source. With Delphi 7, I was able to add all sorts of extras by copying the SOAP code into my app's folder and editing it carefully. In one case I did some string manipulation to adjust the incoming SOAP packet to make it work with the way Delphi worked. I've not had to do this with RemObjects yet, but you do get the source for that too. Plus they have active newsgroups you can ask questions on.
In some cases I found it much easier to write a proxy SOAP service in C# and VS, and consume it from Delphi with a simplified service description (WSDL). In the long term it was the most efficient solution, without any problems regarding stability or performance. The SOAP support in Delphi is not one of its highlights.

Resources