Search Results

Search found 7391 results on 296 pages for 'record locking'.

Page 135/296 | < Previous Page | 131 132 133 134 135 136 137 138 139 140 141 142  | Next Page >

  • Samba issue with sharing directories on NTFS/FAT32

    - by Microkernel
    I have some strange problems with Samba server. I am using samba Version 3.5.4 on Ubuntu 10.10. I have two Windows XP machines, one on VirtualBox on Ubuntu and another office laptop. Windows machine on VirtualBox has no issues in accessing the shared folders, but the laptop is not able to access all the shared content. The issue faced on laptop is the following. Shared folders on ext3 drives have no issues in accessing, but the contents shared on NTFS and FAT32 drives (mounted ones) are not accessible. When I try to open the shared folder, it asks for user name and password, but doesn't accept when I provide it. (Even if I provide admin login details). I changed workgroup value to the domain_name in office laptop, but still the problem persists. Here is the smdb.conf I am using: [global] workgroup = XXX.XXX.ORG server string = %h server (Samba, Ubuntu) map to guest = Bad User obey pam restrictions = Yes pam password change = Yes passwd program = /usr/bin/passwd %u passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . unix password sync = Yes syslog = 0 log file = /var/log/samba/log.%m max log size = 1000 dns proxy = No usershare allow guests = Yes panic action = /usr/share/samba/panic-action %d guest ok = Yes [homes] comment = Home Directories [printers] comment = All Printers path = /var/spool/samba read only = No create mask = 0700 printable = Yes browseable = No [print$] comment = Samba server's CD-ROM path = /cdrom force user = nobody force group = nobody locking = No Workgroup was defined as "HOMENET" before, changed it to domain name on the office laptop thinking it was the problem, but for no avail.

    Read the article

  • Újabb Oracle TPC-H rekord 3 TB-on, a nem klaszterezett kategóriában

    - by Fekete Zoltán
    A TPC-H a döntéstámogatási, adattárházas, üzleti intelligencia rendszerek teljesítményét méri, www.tpc.org. Most a 3 TB-os méretben született új rekord a TPC-H teszten a non-clustered kategóriában az Oracle Database 11gR2-vel, Sun M9000 hardveren. „A nagy méretu rendszerekben elért TPC-H benchmark-rekordokkal az Oracle Database 11g továbbra is orzi vezeto helyét az adattárház-rendszerek között" - nyilatkozta Juan Loaiza, az Oracle rendszertechnológiáért felelos elso alelnöke. „Ez az eredmény bizonyítja, hogy az Oracle Database 11g és az Oracle Sun SPARC Enterprise M9000 kiszolgálója együttesen nagyteljesítményu alapot biztosít az ügyfelek adattárház-alkalmazásai számára." Az Oracle sajtóhír magyar nyelven: Az Oracle® Database 11g új világrekordot állított fel a Sun SPARC Enterprise M9000 kiszolgálón végzett három terabájtos fürtözés nélküli TPC-H sebességpróbán Az Oracle sajtóhír angol nyelven: Oracle® Database 11g Sets New World Record TPC-H Three Terabyte Non-Clustered Benchmark Result on Sun SPARC Enterprise M9000 Server

    Read the article

  • Does google contribute ranking from cdn.example.com to example.com?

    - by DesignerGuy
    Background From my understanding, http://mywebsite.com/image.jpg, can help the ranking of http://mywebsite.com in a search engine, such as Google (obviously the search engine of primary concern). So, SEO-wise, moving an image to http://whatever-cdn.com/my-account/image.jpg is bad. A popular solution is to use a CNAME record, such as http://cdn.mywebsite.com, so that image.jpg can be accessed at http://cdn.mywebsite.com/image.jpg. The question Does http://cdn.mywebsite.com/image.jpg rank as effectively as http://mywebsite.com/image.jpg ? Does it help boost the main http://mywebsite.com ? Or, does it rank independently because it is a subdomain? Is there another option (a way to use a CDN without sacrificing ranking)?

    Read the article

  • SQL Down Under Show 51 - Guest Conor Cunningham - Now online

    - by Greg Low
    Late last night I got to record an interview with Conor Cunningham.Most people that know Conor have come across him as the product team wizard that knows so much about query processing and optimization in SQL Server. Conor is currently spending quite a lot of time working on Windows Azure SQL Database, which we used to know as SQL Azure. I'm still trying to think of a good way to say "WASD". I suppose I'll pronounce it like "wassid". Windows Azure SQL Reporting is easier. I think it just needs to be pronounced like "wazza" with a very Australian accent.In the show, we've spent time on the current state of the platform, on dispelling a number of common misbeliefs about the product, and hopefully on answering most of the common questions that seem to get asked about it. We then ventured into Federations, Data Sync, and Reporting.You'll find the show (and previous shows) here: http://www.sqldownunder.com/Resources/Podcast.aspxEnjoy!PS: For those that like transcripts, we've got the process for producing them much improved now and the transcript should also be up within a few days.

    Read the article

  • More Tables or More Databases?

    - by BuckWoody
    I got an e-mail from someone that has an interesting situation. He has 15,000 customers, and he asks if he should have a database for their data per customer. Without a LOT more data it’s impossible to say, of course, but there are some general concepts to keep in mind. Whenever you’re segmenting data, it’s all about boundary choices. You have not only boundaries around how big the data will get, but things like how many objects (tables, stored procedures and so on) that will be involved, if there are any cross-sections of data (do they share location or product information) and – very important – what are the security requirements? From the answer to these types of questions, you now have the choice of making multiple tables in a single database, or using multiple databases. A database carries some overhead – it needs a certain amount of memory for locking and so on. But it has a very clean boundary – everything from objects to security can be kept apart. Having multiple users in the same database is possible as well, using things like a Schema. But keeping 15,000 schemas can be challenging as well. My recommendation in complex situations like this is similar to a post on decisions that I did earlier – I lay out the choices on a spreadsheet in rows, and then my requirements at the top in the columns. I  give each choice a number based on how well it meets each requirement. At the end, the highest number wins. And many times it’s a mix – perhaps this person could segment customers into larger regions or districts or products, in a database. Within that database might be multiple schemas for the customers. Of course, he needs to query across all customers, that becomes another requirement. Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!

    Read the article

  • What the Hekaton?

    - by Tony Davis
    Hekaton, the power behind SQL Server 2014′s In-Memory OLTP technology, is intended to make data operations run orders of magnitude faster on SQL Server. This works its magic partly by serving database workloads entirely from main memory, using memory-optimized table structures. It replaces the relational engine’s standard locking model with an optimistic concurrency model based on time-stamped row versions. Deeper down the Hekaton engine uses new, ‘latch free’ data structures. So far, so good, but performance improvements on this scale require a compromise, and the compromise is that these aren’t tables as we understand them. For the database developer, these differences are painful because they involve sacrificing some very important bits of the relational model. Most importantly, Hekaton tables don’t currently support FOREIGN KEY constraints or CHECK constraints, and you can’t put the checks in triggers because there aren’t any DML triggers either. Constraints allow a relational designer to enforce relational integrity and data integrity. Without them, of course, ‘bad data’ can get into our Hekaton tables. There is no easy way of preventing it. For several classes of database and data, this is a show-stopper. One may regard all these restrictions regretfully, seeing limited opportunity to try out Hekaton with current databases, but perhaps there is also a sudden glow of recognition. Isn’t this how we all originally imagined table variables were going to be, back in SQL 2005? And they have much the same restrictions. Maybe, instead of pretending that a currently-designed database can be ‘Hekatonized’ with a few mouse clicks, we should redesign databases for SQL 2014 to replace table variables with Hekaton tables, exploiting this technology for fast intermediate processing, and for the most part forget, for now, the idea of trying to convert our base relational tables into Hekaton tables. Few database developers would be averse to having their working tables running an order of magnitude faster, as long as it didn’t compromise the integrity of the data in the base tables.

    Read the article

  • The Apple iPad &ndash; I&rsquo;m gonna get it!

    - by Sahil Malik
    Ad:: SharePoint 2007 Training in .NET 3.5 technologies (more information). Well, heck, here comes another non-techie blogpost. You know I’m a geek, so I love gadgets! I found it RATHER interesting to see all the negative news on the blogosphere about the iPad. The main bitch points are - No Multi tasking No Flash Just a bigger iPhone. So here’s the deal! My view is, the above 3 are EXACTLY what I had personally hoped for in the Apple iPad. Before the release, I had gone on the record saying - “If the Apple Tablet is able to run full fledged iTunes (so I can get rid of iTunes on my desktop, I don’t like iTunes on Windows), can browse the net, can read PDFs, and will be under $1000, I’ll buy it”. Well, so, the released iPad wasn’t exactly like my dream tablet. The biggest downer IMO was it’s inability to run full iTunes. But, really, in retrospect, I like the newly released iPad. And here is why. No Multi tasking and No Flash, means much better battery life. Frankly, I rarely multi task on my laptop/desktop .. yeah I know my OS does .. but ME – I don’t multi task, and I don’t think you do either!! As I type this blogpost, I have a few windows running behind the scenes, but they are simply waiting for me to get back to them. The only thing truly running and I am making use of, other than this blogost, is media player playing some music – which the iPad can do. Also, I am logged into IM/Email – which again, iPad can do via notifications. It does the limited multitasking I need, without chewing down on batteries. Smart thinking, precisely the reason I love the iPhone. I don’t want a bulky battery consuming machine. Lack of flash? Okay sure, I can’t see Hulu on my iPad. That’s some loss. I can see youtube. Also, per Adobe I can’t see some porn sites, which I don’t want to see on my iPad. But, Flash is heavy. Especially flash video. My dream is to see silverlight run on the iPhone and iPad. No flash = not such a big loss. Speaking of battery life – 10 hours is plenty. I haven’t been away from electricity for that long usually, so I’m okay with charging it up when it runs low. It’s really not such a big deal honestly. Finally, eBook functionality – wow! I went on the record saying, eBook readers are not for me, but seriously, the iPad is perfect for my eBook needs at least. And as far it being just a bigger iPhone? I’ve always wanted a bigger iPhone, precisely for the eBook reading experience. I love my iPhone, I love the apps on it. The only thing that sucks about the iPhone is battery life, but other than that, it is the best gadget I have ever bought! And something that runs on mobile chips, is that thin, and those newly written apps .. mail, calendar .. I am very very excited to get my iPad, which will be the 64gig 3G version. The biggest plus in an iPad ……… no contract on data. I am *hoping*, this means that I can buy a SIM card in Europe, and use the iPad here. That would be killer awesome! But hey, if I had to pick downers in the iPad, they would be - - I wish they had a 128G Version. Now that we have a good video viewing machine, I know I’d chew up space quickly.- Sync over WIFI, seriously Apple.  Both for iPhone and iPad.- 3 month wait!!- Existing iPhone users should get a discount on the iPad data plan. Comment on the article ....

    Read the article

  • Shifting from no-www to www and browsers' password storage

    - by user1444680
    I created a website having user-registration system and invited my friend to join it. I gave him the link of no-www version: http://mydomain.com but now after reading this and this, I want to shift to www.mydomain.com. But there's a problem. I saw that my browser is storing separate passwords for mydomain.com and www.mydomain.com. So in my friend's browser his password must have been stored for no-www. That means after I shift to www and next time he opens the login page, his browser wouldn't auto-fill the username and password fields and there will also be an extra entry (of no-www) in his browser's database of stored passwords. Can this be avoided? Can I do something that will convey to browsers that www.mydomain.com and mydomain.com are the same website? I already have a CNAME record for www pointing to mydomain.com but it seems that search engines consider CNAME as alias but browsers consider them as different websites, I don't know why.

    Read the article

  • How To Specify Bitrate, Codec and Demultiplexing for VLC Video Capture or Recording

    - by Subhash
    I capture video from old TV tuner card - Pinnacle PCTV - using VLC. The video is from the Composite input and audio is from I guess the mixer or Line in. The command I use is: vlc v4l2:///dev/video0:normal=pal:width=720:height=576:input=1 :input-slave="alsa://hw:0,0" In VLC, I have enabled the Advanced Controls toolbar, which allows me to record videos when I want to. However, these videos are uncompressed - very big and play only with VLC. Totem throws the "Could not demultiplex stream" error. I need to convert them using WinFF to reduce their size and make them playable with Totem and other software. My question is whether I can configure the recording settings - the codecs and the bitrate, and also get the stream demultiplexed. If I pass any -sout parameter with command I get a "Segmentation fault". I use 64-bit Ubuntu 10.10.

    Read the article

  • How can I create a facebook style message system in Rails 3?

    - by Angela
    I am trying to create a basic message system that allows users to send messages to each other and display it in a simple "Inbox" that shows both messages received and sent, as well as the status of read or unread. Ideally I could reuse existing code. But if not, can someone provide a framework to help me do it? I started to use a single Message record that has UserMessage - one for the sender, one for the receiver. That way I could have separate status. But I'm not sure I'm quite doing it right and would like some guidance. Thanks.

    Read the article

  • Why isn't DSM for unstructured memory done today?

    - by sinned
    Ages ago, Djikstra invented IPC through mutexes which then somehow led to shared memory (SHM) in multics (which afaik had the necessary mmap first). Then computer networks came up and DSM (distributed SHM) was invented for IPC between computers. So DSM is basically a not prestructured memory region (like a SHM) that magically get's synchronized between computers without the applications programmer taking action. Implementations include Treadmarks (inofficially dead now) and CRL. But then someone thought this is not the right way to do it and invented Linda & tuplespaces. Current implementations include JavaSpaces and GigaSpaces. Here, you have to structure your data into tuples. Other ways to achieve similar effects may be the use of a relational database or a key-value-store like RIAK. Although someone might argue, I don't consider them as DSM since there is no coherent memory region where you can put data structures in as you like but have to structure your data which can be hard if it is continuous and administration like locking can not be done for hard coded parts (=tuples, ...). Why is there no DSM implementation today or am I just unable to find one?

    Read the article

  • Boss solution vs Developer solution

    - by mahen23
    The problem: When we were sending newsletters to customers, there was no way to confirm if the customer already received the mail. So the boss decided to implement this idea: Boss's Idea: Each time mail was being sent, do an INSERT in a db with the title of the newsletter being sent and the email address which is receving the email address. To ensure that any email address does not receive the same email twice, do a SELECT in the table and find the title of the newsletter being sent: if (title of newsletter is found) { check to see of the email we are sending mail to is already present. if it does, do not send mail } else { send mail } MY idea: create a column called unique and mark it as UNIQUE. Each time mail was being sent, concatenate email + newsletter id and record it in the UNIQUE row. The next time we do a "mysql_affected_rows" check to see if our INSERT was successful, we send the mail, else, there is already a duplicate and no need to send it.

    Read the article

  • Can't mount windows partition?

    - by C.J.
    When I try to open the Windows Partition from Ubuntu I receive the error: Unable to mount 55 GB Filesystem Error mounting: mount exited without exit code 13: ntfs_mst_post_read_fixup_warn: magic: 0x04010400 size: 1024 usa_ofs: 1026 usa_count: 1026: Invalid argument Record 6 has no FILE magic (0x4010400) Failed to open inode FILE_Bitmap: Input/output error Failed to mount '/dev/sda2': Input/output error NTFS is either inconsistent, or there is a hardware fault, or it's a SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows then reboot into Windows twice. The usage of the /f parameter is very important! If the device is a SoftRAID/FakeRAID then first activate it and mount a different device under the /dev/mapper/directory, (e.g. /dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation for more detail. Additionally, I can't open the Windows Partition. I've tried updating it many times but it won't show up on GRUB. Does anybody know what all this means? And how I might fix it? I thank you for any help in advance

    Read the article

  • New Endeca Commerce 3.1 Specialization Launched!

    - by Roxana Babiciu
    We’ve just launched the Endeca Commerce 3.1 Specialization! This is your chance to be recognized as a proficient Oracle partner in selling, implementing and/or developing Endeca Commerce 3.1 solutions.  Check the specialization criteria to make sure you qualify! Oracle partners who achieve this Specialization are differentiated in the marketplace through proven expertise in Oracle Endeca Commerce 3.1. Are you a member of the Endeca Community?  If not, this is the place to be for exchanging ideas and questions regarding Endeca Commerce use. Do check it out! Topics covered in the Specialization include: Application Configuration Record Design Pipeline Development Working with Search Features Experience Manager Concepts Overview of Query Types Application development with the Assembler API

    Read the article

  • USB Audio Device Loopback Through Speakers

    - by matto1990
    I have a USB turntable which when plugged in to my ubuntu 10.10 machine appears in the audio settings as an input device (USB PnP Audio Device Analog Stereo) like a microphone. What I'd like to be able to do it to have the sound for that audio device played back through the audio output (speaker or whatever). I'm not too worried if there's a slight delay between the audio coming in and it being played out through the speakers. As far as I'm aware this is refereed to as software loopback. I can achieve exactly what I want if I open Audacity, enable software loopback and press record. Obvious this isn't ideal as I don't really want it recording what I'm playing all the time. I know this is possible because of the Audacity example however I'd like to know if there's a way to do it without it recording. I've search around for a while for a piece of software that does this, however I couldn't get anything even close. Any help would be greatly appreciated.

    Read the article

  • What am I doing wrong in my config for MySql?

    - by Knight Hawk3
    When I load my my.conf with the config at the bottom Mysql fails to start and prints no errors. I am running Arch Linux (Updated) with the latest MySQL (5.5) and the latest nginx (Well latest in the repository, Not sure how to check. Only installed it today) I will give you any info you ask for. Thanks for helping! # The following options will be passed to all MySQL clients [client] #password = your_password port = 3306 socket = /var/run/mysqld/mysqld.sock # Here follows entries for some specific programs # The MySQL server [mysqld] port = 3306 socket = /var/run/mysqld/mysqld.sock skip-locking key_buffer = 16K max_allowed_packet = 1M table_cache = 4 sort_buffer_size = 64K read_buffer_size = 256K read_rnd_buffer_size = 256K net_buffer_length = 2K thread_stack = 64K # Don’t listen on a TCP/IP port at all. This can be a security enhancement, # if all processes that need to connect to mysqld run on the same host. # All interaction with mysqld must be made via Unix sockets or named pipes. # Note that using this option without enabling named pipes on Windows # (using the “enable-named-pipe” option) will render mysqld useless! # #skip-networking server-id = 1 # Uncomment the following if you want to log updates #log-bin=mysql-bin # Uncomment the following if you are NOT using BDB tables skip-bdb # Uncomment the following if you are using InnoDB tables #innodb_data_home_dir = /var/lib/mysql/ #innodb_data_file_path = ibdata1:10M:autoextend #innodb_log_group_home_dir = /var/lib/mysql/ #innodb_log_arch_dir = /var/lib/mysql/ # You can set .._buffer_pool_size up to 50 – 80 % # of RAM but beware of setting memory usage too high #innodb_buffer_pool_size = 16M #innodb_additional_mem_pool_size = 2M # Set .._log_file_size to 25 % of buffer pool size #innodb_log_file_size = 5M #innodb_log_buffer_size = 8M #innodb_flush_log_at_trx_commit = 1 #innodb_lock_wait_timeout = 50 skip-innodb [mysqldump] quick max_allowed_packet = 16M [mysql] no-auto-rehash # Remove the next comment character if you are not familiar with SQL #safe-updates [isamchk] key_buffer = 1M sort_buffer_size = 1M [myisamchk] key_buffer = 1M sort_buffer_size = 1M [mysqlhotcopy] interactive-timeout So what is my silly error?

    Read the article

  • NetBeans, JSF, and MySQL Primary Keys using AUTO_INCREMENT

    - by MarkH
    I recently had the opportunity to spin up a small web application using JSF and MySQL. Having developed JSF apps with Oracle Database back-ends before and possessing some small familiarity with MySQL (sans JSF), I thought this would be a cakewalk. Things did go pretty smoothly...but there was one little "gotcha" that took more time than the few seconds it really warranted. The Problem Every DBMS has its own way of automatically generating primary keys, and each has its pros and cons. For the Oracle Database, you use a sequence and point your Java classes to it using annotations that look something like this: @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="POC_ID_SEQ") @SequenceGenerator(name="POC_ID_SEQ", sequenceName="POC_ID_SEQ", allocationSize=1) Between creating the actual sequence in the database and making sure you have your annotations right (watch those typos!), it seems a bit cumbersome. But it typically "just works", without fuss. Enter MySQL. Designating an integer-based field as PRIMARY KEY and using the keyword AUTO_INCREMENT makes the same task seem much simpler. And it is, mostly. But while NetBeans cranks out a superb "first cut" for a basic JSF CRUD app, there are a couple of small things you'll need to bring to the mix in order to be able to actually (C)reate records. The (RUD) performs fine out of the gate. The Solution Omitting all design considerations and activity (!), here is the basic sequence of events I followed to create, then resolve, the JSF/MySQL "Primary Key Perfect Storm": Fire up NetBeans. Create JSF project. Create Entity Classes from Database. Create JSF Pages from Entity Classes. Test run. Try to create record and hit error. It's a simple fix, but one that was fun to find in its completeness. :-) Even though you've told it what to do for a primary key, a MySQL table requires a gentle nudge to actually generate that new key value. Two things are needed to make the magic happen. First, you need to ensure the following annotation is in place in your Java entity classes: @GeneratedValue(strategy = GenerationType.IDENTITY) All well and good, but the real key is this: in your controller class(es), you'll have a create() function that looks something like this, minus the comment line and the setId() call in bold red type:     public String create() {         try {             // Assign 0 to ID for MySQL to properly auto_increment the primary key.             current.setId(0);             getFacade().create(current);             JsfUtil.addSuccessMessage(ResourceBundle.getBundle("/Bundle").getString("CategoryCreated"));             return prepareCreate();         } catch (Exception e) {             JsfUtil.addErrorMessage(e, ResourceBundle.getBundle("/Bundle").getString("PersistenceErrorOccured"));             return null;         }     } Setting the current object's primary key attribute to zero (0) prior to saving it tells MySQL to get the next available value and assign it to that record's key field. Short and simple…but not inherently obvious if you've never used that particular combination of NetBeans/JSF/MySQL before. Hope this helps! All the best, Mark

    Read the article

  • Regardig Vb.net [closed]

    - by user68999
    hi everyone i am making a project for school management and manage all the record of student so I'm using VB.net 2008 and sql server 2008. i have a problem when i enter student date of birth in text box with date&time picker in database. but i want in the search option enter the date from date&time picker and get age of all the student data in data-view grid. like student are 10 year old, 11 year old etc. so how it can possible please help..........?

    Read the article

  • JAVA Script confirmation message on button click

    - by Rajneesh Verma
    HI, some times we stuck that how to show confirmation message to do a server side event for example to delete record message should be “Are you sure you want to delete?” so the simplest option is: Code Snippet < asp : Button ID ="Button1" runat ="server" OnClientClick ="return confirm('Are you sure you want to delete?');" onclick ="Button1_Click" Text ="Delete" /> A small tip :) Thanks…...(read more)

    Read the article

  • Of transactions and Mongo

    - by Nuri Halperin
    Originally posted on: http://geekswithblogs.net/nuri/archive/2014/05/20/of-transactions-and-mongo-again.aspxWhat's the first thing you hear about NoSQL databases? That they lose your data? That there's no transactions? No joins? No hope for "real" applications? Well, you *should* be wondering whether a certain of database is the right one for your job. But if you do so, you should be wondering that about "traditional" databases as well! In the spirit of exploration let's take a look at a common challenge: You are a bank. You have customers with accounts. Customer A wants to pay B. You want to allow that only if A can cover the amount being transferred. Let's looks at the problem without any context of any database engine in mind. What would you do? How would you ensure that the amount transfer is done "properly"? Would you prevent a "transaction" from taking place unless A can cover the amount? There are several options: Prevent any change to A's account while the transfer is taking place. That boils down to locking. Apply the change, and allow A's balance to go below zero. Charge person A some interest on the negative balance. Not friendly, but certainly a choice. Don't do either. Options 1 and 2 are difficult to attain in the NoSQL world. Mongo won't save you headaches here either. Option 3 looks a bit harsh. But here's where this can go: ledger. See, and account doesn't need to be represented by a single row in a table of all accounts with only the current balance on it. More often than not, accounting systems use ledgers. And entries in ledgers - as it turns out – don't actually get updated. Once a ledger entry is written, it is not removed or altered. A transaction is represented by an entry in the ledger stating and amount withdrawn from A's account and an entry in the ledger stating an addition of said amount to B's account. For sake of space-saving, that entry in the ledger can happen using one entry. Think {Timestamp, FromAccountId, ToAccountId, Amount}. The implication of the original question – "how do you enforce non-negative balance rule" then boils down to: Insert entry in ledger Run validation of recent entries Insert reverse entry to roll back transaction if validation failed. What is validation? Sum up the transactions that A's account has (all deposits and debits), and ensure the balance is positive. For sake of efficiency, one can roll up transactions and "close the book" on transactions with a pseudo entry stating balance as of midnight or something. This lets you avoid doing math on the fly on too many transactions. You simply run from the latest "approved balance" marker to date. But that's an optimization, and premature optimizations are the root of (some? most?) evil.. Back to some nagging questions though: "But mongo is only eventually consistent!" Well, yes, kind of. It's not actually true that Mongo has not transactions. It would be more descriptive to say that Mongo's transaction scope is a single document in a single collection. A write to a Mongo document happens completely or not at all. So although it is true that you can't update more than one documents "at the same time" under a "transaction" umbrella as an atomic update, it is NOT true that there' is no isolation. So a competition between two concurrent updates is completely coherent and the writes will be serialized. They will not scribble on the same document at the same time. In our case - in choosing a ledger approach - we're not even trying to "update" a document, we're simply adding a document to a collection. So there goes the "no transaction" issue. Now let's turn our attention to consistency. What you should know about mongo is that at any given moment, only on member of a replica set is writable. This means that the writable instance in a set of replicated instances always has "the truth". There could be a replication lag such that a reader going to one of the replicas still sees "old" state of a collection or document. But in our ledger case, things fall nicely into place: Run your validation against the writable instance. It is guaranteed to have a ledger either with (after) or without (before) the ledger entry got written. No funky states. Again, the ledger writing *adds* a document, so there's no inconsistent document state to be had either way. Next, we might worry about data loss. Here, mongo offers several write-concerns. Write-concern in Mongo is a mode that marshals how uptight you want the db engine to be about actually persisting a document write to disk before it reports to the application that it is "done". The most volatile, is to say you don't care. In that case, mongo would just accept your write command and say back "thanks" with no guarantee of persistence. If the server loses power at the wrong moment, it may have said "ok" but actually no written the data to disk. That's kind of bad. Don't do that with data you care about. It may be good for votes on a pole regarding how cute a furry animal is, but not so good for business. There are several other write-concerns varying from flushing the write to the disk of the writable instance, flushing to disk on several members of the replica set, a majority of the replica set or all of the members of a replica set. The former choice is the quickest, as no network coordination is required besides the main writable instance. The others impose extra network and time cost. Depending on your tolerance for latency and read-lag, you will face a choice of what works for you. It's really important to understand that no data loss occurs once a document is flushed to an instance. The record is on disk at that point. From that point on, backup strategies and disaster recovery are your worry, not loss of power to the writable machine. This scenario is not different from a relational database at that point. Where does this leave us? Oh, yes. Eventual consistency. By now, we ensured that the "source of truth" instance has the correct data, persisted and coherent. But because of lag, the app may have gone to the writable instance, performed the update and then gone to a replica and looked at the ledger there before the transaction replicated. Here are 2 options to deal with this. Similar to write concerns, mongo support read preferences. An app may choose to read only from the writable instance. This is not an awesome choice to make for every ready, because it just burdens the one instance, and doesn't make use of the other read-only servers. But this choice can be made on a query by query basis. So for the app that our person A is using, we can have person A issue the transfer command to B, and then if that same app is going to immediately as "are we there yet?" we'll query that same writable instance. But B and anyone else in the world can just chill and read from the read-only instance. They have no basis to expect that the ledger has just been written to. So as far as they know, the transaction hasn't happened until they see it appear later. We can further relax the demand by creating application UI that reacts to a write command with "thank you, we will post it shortly" instead of "thank you, we just did everything and here's the new balance". This is a very powerful thing. UI design for highly scalable systems can't insist that the all databases be locked just to paint an "all done" on screen. People understand. They were trained by many online businesses already that your placing of an order does not mean that your product is already outside your door waiting (yes, I know, large retailers are working on it... but were' not there yet). The second thing we can do, is add some artificial delay to a transaction's visibility on the ledger. The way that works is simply adding some logic such that the query against the ledger never nets a transaction for customers newer than say 15 minutes and who's validation flag is not set. This buys us time 2 ways: Replication can catch up to all instances by then, and validation rules can run and determine if this transaction should be "negated" with a compensating transaction. In case we do need to "roll back" the transaction, the backend system can place the timestamp of the compensating transaction at the exact same time or 1ms after the original one. Effectively, once A or B visits their ledger, both transactions would be visible and the overall balance "as of now" would reflect no change.  The 2 transactions (attempted/ reverted) would be visible , since we do actually account for the attempt. Hold on a second. There's a hole in the story: what if several transfers from A to some accounts are registered, and 2 independent validators attempt to compute the balance concurrently? Is there a chance that both would conclude non-sufficient-funds even though rolling back transaction 100 would free up enough for transaction 117 (some random later transaction)? Yes. there is that chance. But the integrity of the business rule is not compromised, since the prime rule is don't dispense money you don't have. To minimize or eliminate this scenario, we can also assign a single validation process per origin account. This may seem non-scalable, but it can easily be done as a "sharded" distribution. Say we have 11 validation threads (or processing nodes etc.). We divide the account number space such that each validator is exclusively responsible for a certain range of account numbers. Sounds cunningly similar to Mongo's sharding strategy, doesn't it? Each validator then works in isolation. More capacity needed? Chop the account space into more chunks. So where  are we now with the nagging questions? "No joins": Huh? What are those for? "No transactions": You mean no cross-collection and no cross-document transactions? Granted - but don't always need them either. "No hope for real applications": well... There are more issues and edge cases to slog through, I'm sure. But hopefully this gives you some ideas of how to solve common problems without distributed locking and relational databases. But then again, you can choose relational databases if they suit your problem.

    Read the article

  • DDDSouthWest 4.0 26th May 2012 - Async 20/20 presentation

    - by Liam Westley
    As I wasn’t voted in with my nominated sessions I presented a 20/20 talk on the new async functionality coming with the .Net Framework.  This was based on the PechaKucha presentation format, where you have only 20 slides with only 20 seconds per slide, and it progresses automatically. It was the first I’d attempted, so thanks to the organisers for allowing me to have a go. Although creating the slide deck was definitely easier than a one hour presentation, it was much more stressful giving the talk by the end of the 6m 40s. I’m not going to upload the slide deck (it won’t make much sense) but I did record the audio and used the excellent Camtasia to create a video of the slide deck with that audio which you can watch over here, https://vimeo.com/42957952

    Read the article

  • What is the best way to promote a programming blog?

    - by paul
    (The guys from 'Programmers' referred me here...) How do you promote your programming blog? I recently started http://blackforestcoder.blogspot.com/ to record my progress working with new technologies and ideas. The main aim being to provide a list of pitfalls and solutions and also to get feedback from readers. Since I set it up 10 days ago I have only had about 2-3 hits even though Google is supposed to be indexing it. How might I boost the hit rate?

    Read the article

  • Using macro keys with razer blackwidow ultimate 2013

    - by user119020
    I recently bought a Razer blackwidow ultimate 2013 keyboard. The keyboad contains 5 macro keys and according to the manual, they can be quickly set using the key combination fn+f9. However, this doesn't work; it won't record any macros. All the other function buttons on the keyboard work fine (e.g. volume up, volume down, stand-by) Does anyone know how I can enable those keys? Maybe an extra package. I am using 64 bit ubuntu 12.04 Thanks in advance :)

    Read the article

  • Impact of changing from PHP to Java after 1 year or 6 months

    - by user62909
    I'm MCA final year student and I have very poor school record and had 2 years of gap. I'm first class with distinction in graduation and in post graduation is first class.Companies are coming for campus recruitment.I have very less companies like 4 or 5 who don't impose any criteria. there is a company who work on PHP and i have cleared its aptitude test and technical only HR remaining. I'm actually interested in Java and have knowledge about it but company work on PHP.I was fretting about If i work on PHP for 6 or 1 year can I change later to Java ? because i will also have experience of 6 or 12 months ? Will be considered an experienced employee if I apply for java developer later ? Will manager think that I worked in PHP and not allowed for Java ? Will I have to pursue java OCJP certification so i can get job even after 1 year experience of PHP ? Only 8 days are remaining for Hr round so please need help

    Read the article

  • I'm porting my app from iOS to Android: what do I need to know?

    - by kubi
    What pitfalls should I avoid? What Java language paradigms do Objective-C developers consistently misunderstand? I learned to program in Java, but I have worked in nothing but Objective-C for years now. How are the design patterns different between Android and iOS? If you've made the transition yourself, what parts of Android confused you or took you longer to learn than it should have? Is Eclipse the best OS X IDE for Android? For the record, my app is very strongly tied to UIKit and Foundation, so the word "porting" may be a misnomer; I'll actually be completely rewriting it for Android. No code reuse. Also, I'm doing this to learn Android, so I'd rather fail at the port and learn Android than take a shortcut.

    Read the article

< Previous Page | 131 132 133 134 135 136 137 138 139 140 141 142  | Next Page >