Persistent Storage Goals

What got me interested in this little project? Well, I’m not entirely sure, but of course in the programming world you hear about the cloud and microservices all the time. Anyway I thought it would be interesting to learn about and play with. Combine that with things going on in SL and the general difficulty one has in dealing with large amounts of data, and it just seemed like a good idea to try. Here are some of the things I care about as I do this project.

Rapid Results

As a student of Agile software development, the real thing, not the fake Scrum and stuff that’s so common, I’ve been taught to produce real software that works, from early in an effort, and to keep it running and improving as I go along. So whatever approach I took, I wanted that to be possible.

To me, that means I should be able to get bits of the whole thing working rapidly, from out in the cloud to inside SL, in a few days, preferably to a few weeks, and certainly not months.

That does mean that as I build things, they change, but that’s OK. If I can build quickly, then rebuilding or changing things as I learn isn’t that hard. And, I admit it, I enjoy poring over the code, making it “better”. In a work situation, often a programmer is under so much pressure to go go go that she can’t do her best work. In Second Life, the only thing keeping me from my best work is my own laziness and torpor. And there’s plenty of that to go around.

Anyway, I want rapid, continuous progress.

Minimize “Real” Programming

Building with microservices is supposedly mostly about connecting services together, although of course one does also write them, little bits of functionality that one needs. I wanted to focus my learning on the connecting parts. I write lots of little Ruby programs or even Python or JavaScript programs anyway, and putting those on the web seemed mostly tedious without much learning. I could be wrong about that, and probably when I start doing it, I’ll discover lots of things. Anyway, I want to focus mostly on hooking things up, not writing code. I expected to learn things about testing in that world that would be different from my larger-scale programming experience.

Do Most of the Programming in SL

I’m thinking of the web services part of what I do here as very “bare bones”. My core idea was just that there’d be some way of saving a simple key-value pair, a string for a key, a string for a value, out on the internet, and getting it back. I actually started by looking for a free existing service, and though I found a couple, they seemed kind of iffy and it seemed better to write my own and learn a bit.

Even so, the part on the web should be quite simple. We’ll talk about these in more detail but right now, the web functions I have are

  • Read – read a text record by primary and secondary key;
  • Write – write a text record by primary and secondary key;
  • Delete – delete by keys;
  • Query – process all records with a given primary key;

I’ve got a couple more in mind, such as the ability to process all records. Maybe I’ll even extend to some kind of simple record selections. I’m here to learn, but this is all I need for now.

JSON

JSON, JavaScript Object Notation I think it stands for, is a weird little “language” for describing data in a string format. I’ll not go into a lot of detail here but if we had a record with name, age, and salary, it might look like this in JSON

{ name: "janet rossini", age:28, salary:12345.67 }

Using the Second Life JSON functions, I can get any record format I may need, so rather than  go through a tedious database admin thing, my plan is just to have a single value field on the database, and to define whatever fields I want inside the SL script using the JSON.

However, we may not stick with that. The Amazon Web Services database I’m using, DynamoDB, does allow for fields to be defined on the fly. Each record could have different fields from any other, except for the keys. And if you do that, there is some rudimentary query capability. So we may explore that later. For now, I’ll just be using primary key, secondary key, and value as my three fields.

Amazon Web Services

This didn’t start out as a goal but after some study, I decided to use AWS for this experiment. I’ve settled, for now, on DynamoDB to store the data, as it seems to be at about right right level of simplicity for my purpose. S3 seemed too simplistic, and their other database offerings were more complex than I needed. And API Gateway is interesting, because it allows you to set up a simple API, like my read, write, delete one, with no real coding, just some JSON descriptions of the interface. I’ll be describing that as I get into details.

Summing Up …

I think those are the main goals I had in mind, at least the ones I remember just now. I’ll update this either with new ones or old ones I have but have forgotten.

See you soon!

One thought on “Persistent Storage Goals

Add yours

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: