Several years ago I was thinking about buying a small gas station in my local town. I went to my friend Gregory Z., a successful businessman in this field, and asked him, "How do I start a gasoline business?" He gave me simple but wise advice: "You know nothing about gas, but know a lot about computers. Keep doing what you're doing. Just be a little better than others".
I'm trying to follow his advice but I keep thinking how would I apply my software skills had I bought such a business. So here I am again asking for your help, advice, and experience: let's automate my virtual gas station.
The Setup
I've borrowed the money from a bank and now I have:
A four-car gas station
A small convenience store (coffee, cigarettes, milk, newspapers)
A repair shop that changes oil, brake pads, and tires
Six employees: one American, two from India, one from Russia, and two from Pakistan; one employee speaks English, and the others speak well in their native languages. I think they have work permits.
Three decent Wintel computers
$1,000 USD software budget
Service-Oriented Architecture
The only difference between my gas station and Wal-Mart is that they have more suppliers, sell more products, and have more customers. But I'm facing similar challenges: I need to deal with various suppliers of gas, food products, and car parts. I also need to have accounting and payroll systems. That's why I'm planning to architect a system that has different services communicating with each other. I need a service-oriented architecture (SOA).
In a perfect world, all service providers use the same protocol, which is as challenging as having all my employees use only the English language. My employees are trying hard, because for them it's a matter of surviving. Initially they are exposing just a minimal number of public services like fillItUp, getCash, processPlastic, marlboroLightsPlease, oilChange, and takeTip. Smarter employees quickly add more services to their vocabulary to become more competitive. Each of these coarse-grained services may consist of several smaller steps, but consumers don't need to know about them.
Service Coupling
When the guy who sold me the business gave me a pile of different forms to use with suppliers, I thought to myself, "Tight coupling in action." I need to know where these suppliers are located, their services, and how to request them. If a particular vendor changes its request form (the protocol), I'll need to get a new one, otherwise I may lose this service. I'd rather be sending a message to some destination saying, "Yakov needs 1,000 gallons of 93-octane gasoline." Expected response: several price quotes from different vendors. This would be an example of decoupled services. I don't know who they are and they don't know who I am, but we've dynamically discovered each other. I've heard that Jini could help me with this. Is this right? Anyway, in a loosely coupled system a service requestor needs to know the name of the service, what data to provide, and what to expect back, but it should be easy to switch from one provider to another.
Messaging and Transport
One of the best ways to request and receive services is by using asynchronous messaging. JMS is an excellent API, but you still need a transport to deliver your messages between the services, for example, message-oriented middleware (MOM). IBM and Tibco offer great MOM products, but I'd need to sell my gas station and get another loan just to pay for it. No, I need to find something for free.
Web Services
Web services seems to be a decent way to arrange my interaction with external suppliers using a free Internet-HTTP-WSDL-UDDI-SOAP combo. If my external vendors will start publishing their gasoline-tires-milk quotes, I'll write a program that will automatically be looking for the best deal in my neighborhood. Can Eclipse IDE help me with automatic generation of all supporting files for Web services?
OOP Plus AOP
It goes without saying that I'm thinking objects (thank you, Bruce). When I close my eyes, I clearly see the classes Product, Order, and Customer…but after reading about aspect-oriented programming (AOP) these objects become blurry. But AOP is a way to go and I'll dig more in this direction.
Storing My Data
I need a free DBMS. It doesn't have to be fancy and implement sophisticated SQL constructs. Inner and outer joins plus indexing will do. Coding business logic in stored procedures is not in fashion these days. Hibernate looks nice for object-relational mapping. Is this my best option?
Front End
For thin Web clients I'm planning to learn AJAX. If Google did it, so can I. How about rich clients? Swing is not there yet; SWT looks better; .NET is the best but isn't free. Should I spend my money on VB.NET? But I don't know VB! Let me ask my Russian employee Alex if he knows it. He looks like a PhD (does he really have a work permit?).
Help
I'd love to hear your input to this new column. You don't need to write any code, but rather suggest some affordable tools and architectural solutions for my small business. Just provide your feedback to the online version of this article at http://jdj.sys-con.com/read/108260.htm.
About Yakov Fain Yakov Fain is a managing principal of Farata Systems, consulting, training and product company. He has authored several Java books, dozens of technical articles. SYS-CON Books released his latest co-authored book , "Rich Internet Applications with Adobe Flex and Java: Secrets of the Masters" in Spring 2007. Sun Microsystems has nominated and awarded Yakov with the title Java Champion. He leads the Princeton Java Users Group. Yakov teaches Java and Flex 2 part time at New York University. He is an Adobe Certified Flex Instructor and an Editor-in-Chief of Flex Developers Journal.
Tamizhan wrote: Hi Yakov,
It may be a very late
mail to suggest your
small business
solutions.I believe that
the following open source
softwares can be used to
create cross platform
multitiered application
for any small business.
OS : Linux
Fron End :
JSPs,Struts,Ajax.
Swing(For Stand alone
Machines)
Back End : MySQL or
DBMaker
Middleware : Stateless
Session Bean,MDB,Java
Webservice
Server : JBoss
Object Relational Mapping
: Hibernate
Logging : Log4J
IDE : Eclipse,Netbeans
Build tool : Ant
Version Control : CVS
Bug Reporting tool :
Bugzilla
Many Systems running
successfully using the
above mentioned tools.I
don't know the Free MOM
tools and Content
Management tools.
Developers : Free Lance
Programmers!. If you make
BIG MONEY after
successful Launch of
Business or
Application,You can PAY
money to Free Lance
Programmers.
Gabriel wrote: Many
people here didn't get
the point quite right.
1st, there is no gas
station. 2nd, this
article is about trying
to find ways to build an
IT infrastructure for
small business, which are
low on budget. What
development tools and
technologies best fit in
this scenario? Based on
this, what is the best
way to acomplish the
needed tasks? Remember,
this article is about how
to develop software for
the small business, using
open source software¹,
based on the same
technologies used by the
big guys.
¹ I think open standards
are more important than
open sourse, but none of
them are problems for
Java.
Ted Weismann wrote: Hi
Yakov,
For the front end, have
you considered using
Sun's Java Studio
Creator? It combines
100% Java standards with
visual programming, e.g.
JavaServer Faces for
visual UI design and
simplified coding, JDBC
Rowsets for drag-and-drop
data access and visual
query building, and Java
API for XML Web services,
for simplified access to
WSDL based services. It
includes drag-and-drop UI
design and access to
databases and Web
services, as well as
visual page flow design -
all for $99.
Jay wrote: Hi Yakov,
Try using ServiceMix
which is an open source
Enterprise service bus
product by Apache. Its
very nice tool for
integration and they use
JBI (Java Business
Integration) and JSR 208
and EDA (Event Driven
Architecture) which makes
it best ESB framework for
SOA i.e SOA + EDA. You
can deploy this on JBOSS
which is also open source
application server.
Thanks
Jay Poldiya
moshe sheleg wrote:
Shalom Yakov,
Regarding you gas station
software needs, i would
be happy to offer our
services.
Please visit
http://www.siteron.com
for more information.
Do what you do best,
outsource the rest...
Moshe
Yakov wrote: Greg,
Having done both Java
Swing and .Net, why you
do not recommend .Net?
What's wront with it?
Also, what's so good
about JBoss in terms of
monitoring? JMX is
available in any J2EE
compliant server. I
wonder what kind of
monitoring JBoss provides
off the shelf that does
not require additional
programming?
Best,
Yakov
http://www.weekendwithexp
erts.com
Greg wrote: Interesting
way to write an article.
It will be fun to see how
it turns out.
Looks like you are trying
to determine some tools
to use first. You should
probably define your
business needs first.
Anyway, here are some
suggestions for tools...
For the front end, you
asked about using either
.Net or Java. I'm
currently using both Java
and .Net. I have a lot
of Java Swing experience
and some (<6mo)
experience with .Net.
From what I've seen of
.Net 1.1, I would go with
Java unless you find a
Windows specific need
that you cant solve in
Java. If you don't need
a super-rich front end,
you should just make it a
web-based client.
If you are looking for
free databases consider
MySQL or Cloudscape.
However, those are only
relational databases.
Why not consider using a
OO DB?
Another thing you will
need is a goo...
Bill McCuistion wrote: 1.
You won't be the same as
the others, as you'll use
your JAVA skills to
integrate your unique
twists into the QB
framework, such as your
SOAP service for scouting
lowest-cost / best value
suppliers. JAVA works
just fine with the QBSDK,
which is XML-based.
Included in the QBSDK is
a SOAP-to-COM bridge, so
your JAVA code can run
anywhere.
2. When you sell the
station next year, you'll
likely retain a
consulting contract to
maintain the custom apps
you developed. You'll
also likely be able to
negotiate a higher sales
price due to the
increased profitability
due to your "special"
integratons with QB for
general accounting,
purchaing, point-of-sale,
credit card processing,
payroll processing and
customer relationship
managment.
3. Run QB on Linux using
Cross-Over Office. Use
LAMP/J for apps. ...
Yakov Fain wrote: I like
Bill's comment!
Most likely QuickBooks
can solve most of my
needs, but...
1. I do not want to be
the same as any other gas
station owner on the
block.
2. I do not want to cut
my ties with the Java
world. If my gas business
won't become profitable
in a year, I'll sell it
to a QuickBooks user and
return to coding in Java,
and my skills will be up
to date.
3. I want to understand
the world of the open
source software and the
next column (JDJ, Sep
'05) will have an
interview with one of my
famous customers who
happen to be a best
selling author in this
field.
4. By having this
column, we can discuss
real world problems that
small guys face as
opposed to talking all
the time from the
perspective of large
scale enterprises.
Bill McCuistion wrote:
Dude! Get a copy of
QuickBooks and the QB
Point-of-Sale system and
be done with it!
Then, if you need to
integrate applications,
there's a great SDK that
let's you do this.
If you need to get a
programming fix once you
have QB in place, see my
website at
http://qbopen.com or go
to http://developer.intui
t.com.
Now, I didn't write
QuickBooks, and don't
really wish to have to
defend it, but if you've
got to sell gas and need
an immediate
off-the-shelf solution in
your price range, then go
to Best Buy and get the
QBPOS bundle, which also
comes with a Dell
computer.
Branden wrote: Seems like
a few assumptions in the
article were a little..
off base.
-Web services: I prefer
Netbeans, as from my
experience its a lot
farther ahead than
Eclipse nowadays.
-Database: Mysql is free,
quick and easy for this
type of thing. Hibernate
is also a good choice.
- Front end: Check out
DWR for Ajax,
www.getahead.ltd.uk/dwr/.
Also, "Swing is not there
yet, swt looks better".
Have you actually looked
at either of them, or are
you just on crack? The
only thing that SWT does
well is Eclipse. Take a
look at the SWT mailing
lists, or the bug lists,
and you'll notice there
are all kinds of
problems. Swing is
mature, stable, and ready
to go - use it. Also, why
are you asking JDJ
readers about .Net? I'm
sure many of them have
used it but really..
Using tomcat, hibernate,
mysql, a free operating
system, and OS...
jay patel wrote: jms:
many open source products
available
(jboss,objectweb???,etc)
db: postgresql, firebird,
mysql
if u r considering
.net for anything, don't
bother w/ vb.net if u r a
java developer, use c#
vendors: get one gas
vendor to publish in xml
to encourage the others
to do so as well. perhaps
that is some side work in
and of itself.
front end: if browser
based provides the
solution, why consider
thick client?
Scott Fingerhut wrote:
AJAX? Check out
InfoWorld's Jon Udell
speaking to TIBCO and
recording a live demo of
the AJAX tool TIBCO
General Interface --
something anyone can use
(without a Google budget)
to develop compelling
rich internet
applications.
Here's a link to the
InfoWorld blog: http://we
blog.infoworld.com/udell/
2005/05/25.html
Interested in getting
your hands on the
priority preview version?
Join the AJAX Accelerator
Program: http://www.tibco
.com/mk/2005/gi.jsp
James Brockman wrote: >>
For thin Web clients I'm
planning to learn AJAX.
If Google did it, so can
I. How about rich
clients? Swing is not
there yet; SWT looks
better; .NET is the best
but isn't free. Should I
spend my money on VB.NET?
But I don't know VB! Let
me ask my Russian
employee Alex if he knows
it. He looks like a PhD
(does he really have a
work permit?). <<
Actually, .NET is free,
it's just Visual
Studio.NET you pay for.
Download the .NET SDK
from MSDN, then for rich
client development
download SharpDevelop at
http://sharpdevelop.com,
or opt for ASP.NET
WebMatrix at http://www.a
sp.net/webmatrix/ if
you're thinking of
browser front-ends to
your apps. Then, enjoy.
SharpDevelop's support
for VB is secondary to
its C# support, but not
only is SharpDevelop open
source, but it is not
limited to .NET projects.
JDJ News Desk wrote:
Small Business Solutions.
Several years ago I was
thinking about buying a
small gas station in my
local town. I went to my
friend Gregory Z., a
successful businessman in
this field, and asked
him, 'How do I start a
gasoline business?' He
gave me simple but wise
advice: 'You know nothing
about gas, but know a lot
about computers. Keep
doing what you're doing.
Just be a little better
than others'.
Mark wrote: Having done
plenty of Java and VB6(<)
and .Net, I would say
that Swing is more than
there and .Net is
definitely not
better(overall). If
decide you do want to do
.Net DON'T do VB.Net. Do
C#, if you have a Java
background.
For doing AJAX, I would
suggest looking Echo2.
The pressure is on to
keep pace with Web 2.0
entrants into the
marketplace. Rewriting is
expensive; adding AJAX
widgets results in a
complex, unmaintainable
application. Both require
you to hire scarce
JavaScript developers.
Google Web Toolkit -- the
SDK that allows you to
write
A standard from OASIS
called Web Services for
Remote Portlets (WSRP) is
used so portlets can be
decoupled from a portal.
In part one (JDJ, Volume.
13, issue 3) of this
article, we introduced
the relevant standards
and specifications and
then demonstrated WSRP's
capabilities by co
Two of the biggest
launches in Rich Internet
Application history took
place in 2007/2008 when
Adobe launched AIR 1.0 in
February '08 and
Microsoft launched
Silverlight (September
'07). At the 6th
International AJAXWorld
RIA Conference & Expo in
October SYS-CON Events is
delighted
On Tuesday evening Sun
issued a fourth-quarter
guidance range largely
above analysts'
estimates. The company
pre-announced that
revenue for its fiscal
fourth quarter ended June
was $3.725 billion to
$3.8 billion, with gross
margin in the 44-45%
range. Sun expects
non-GAAP profits
Brian Stevens, the Chief
Technology Officer and
Vice President of
Engineering of Red Hat,
delivered his
Virtualization Keynote
'The Future of the
Virtual Enterprise' at
SYS-CON's Virtualization
Conference & Expo 2007
West in San Francisco.
'Virtualization is the
hottest subject
JavaScript is one of the
most interesting and
misunderstood programming
languages in common use
today. Most developers
will go their entire
careers without realizing
its full potential. It's
not often that you get a
language that supports
the feature set that
JavaScript does, whi
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS
SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
Click to Add our RSS Feeds to the Service of Your Choice: